package com.xpxrule.dataobject.base;

import com.xpxrule.constant.ValueType;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * @version 1.0
 * @Author xiangpengxiang
 * @Date 2024/11/20 17:01
 * @注释
 */
@EqualsAndHashCode
@Data
public class StructValue<T> {
    /**
     * 值类型（single：单个值，range：范围值，collection：集合值）
     */
    private ValueType valueType;
    /**
     * 单个值
     */
    private T single;
    /**
     * 范围值
     */
    private Range<T> range;
    /**
     * 集合值
     */
    private List<T> list;
    public StructValue() {}

    public StructValue(T single, Range<T> range, List<T> list) {
        this.single = single;
        this.range = range;
        this.list = list;
    }
}
